<template>
	<div class="goods-details table-theme">
		<head-back-title title="审核详情"></head-back-title>
		<el-card v-if="goodsInfo !='' && isGoods">
			<el-form :model="goodsInfo" ref="goodsInfo" label-width="120px">
				<div class="goods-info">
					<el-row :gutter="20">
						<el-col :span="12">
							<el-form-item label="商品名称:" prop="">
								<el-input disabled v-model="goodsInfo.goods_name" placeholder="请输入商品名称"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="6">
							<el-form-item label="出厂价格:" prop="">
								<el-input disabled v-model="goodsInfo.factory_price" placeholder="请输入内容"></el-input>
							</el-form-item>
						</el-col>
						<el-col :span="6" v-if="goodsInfo.paramter">
							<el-form-item label="运费:" prop="">
								<el-input disabled v-model="goodsInfo.paramter.express_price" placeholder="请输入运费"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="6">
							<el-form-item label="工厂货号:" prop="">
								<el-input disabled v-model="goodsInfo.lining_sn" placeholder="请输入内容"></el-input>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="平台货号:" prop="">
								<el-input disabled v-model="goodsInfo.goods_sn" placeholder="请输入内容"></el-input>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="商品产地:" prop="">
								<el-input disabled v-model="goodsInfo.lining_address" placeholder="请输入内容"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="6">
							<el-form-item label="风格分类:" prop="">
								<el-select disabled v-model="goodsInfo.style_id" placeholder="请选择">
									<el-option v-for="item in StyleList" :key="item.style_id" :label="item.style_name" :value="item.style_id"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="空间分类:" prop="">
								<el-select disabled v-model="goodsInfo.space_id" placeholder="请选择">
									<el-option v-for="item in SpaceList" :key="item.space_id" :label="item.space_name" :value="item.space_id"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="品类分类:" prop="">
								<el-select disabled v-model="goodsInfo.class_id" placeholder="请选择">
									<el-option v-for="item in ClassList" :key="item.class_id" :label="item.class_name" :value="item.class_id"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="6">
							<el-form-item label="材质:" prop="">
								<el-select disabled v-model="goodsInfo.paramter.texture_id" placeholder="请选择">
									<el-option v-for="item in TextureList" :key="item.texture_id" :label="item.texture_name" :value="item.texture_id"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="填充物:" prop="">
								<el-select disabled v-model="goodsInfo.paramter.filler_id" placeholder="请选择">
									<el-option value="1" label="高密度海绵"></el-option>
									<el-option value="2" label="公子棉"></el-option>
									<el-option value="3" label="乳胶"></el-option>
									<el-option value="4" label="羽绒"></el-option>
									<el-option value="5" label="弹簧包"></el-option>
									<el-option value="6" label="太空棉"></el-option>
									<el-option value="7" label="其他"></el-option>
									<el-option value="8" label="无"></el-option>
									<el-option value="9" label="海绵+羽绒"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="工艺:" prop="">
								<el-select disabled v-model="goodsInfo.paramter.craft_id" placeholder="请选择">
									<el-option value="1" label="手工雕刻工艺"></el-option>
									<el-option value="3" label="钢琴烤漆工艺"></el-option>
									<el-option value="4" label="复古铜钉工艺"></el-option>
									<el-option value="5" label="水晶拉扣工艺"></el-option>
									<el-option value="6" label="仿古做旧工艺"></el-option>
									<el-option value="7" label="皮拉扣工艺"></el-option>
									<el-option value="8" label="不锈钢拉丝工艺"></el-option>
									<el-option value="9" label="不锈钢镀金工艺"></el-option>
									<el-option value="10" label="喷金工艺"></el-option>
									<el-option value="11" label="描金工艺"></el-option>
									<el-option value="12" label="描银工艺"></el-option>
									<el-option value="13" label="拼花工艺"></el-option>
									<el-option value="14" label="间棉工艺"></el-option>
									<el-option value="15" label="其他"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="6">
							<el-form-item label="包装件数:" prop="">
								<el-select disabled v-model="goodsInfo.paramter.pack_id" placeholder="请选择">
									<el-option value="1" label="1件"></el-option>
									<el-option value="2" label="2件"></el-option>
									<el-option value="3" label="3件"></el-option>
									<el-option value="4" label="4件"></el-option>
									<el-option value="5" label="5件"></el-option>
									<el-option value="6" label="6件"></el-option>
									<el-option value="7" label="7件"></el-option>
									<el-option value="8" label="8件"></el-option>
									<el-option value="9" label="9件"></el-option>
									<el-option value="10" label="10件"></el-option>
									<el-option value="11" label="两件一包"></el-option>
									<el-option value="12" label="三件一包"></el-option>
									<el-option value="13" label="四件一包"></el-option>
									<el-option value="14" label="五件一包"></el-option>
									<el-option value="15" label="11件"></el-option>
									<el-option value="16" label="12件"></el-option>
									<el-option value="17" label="13件"></el-option>
									<el-option value="18" label="14件"></el-option>
									<el-option value="19" label="15件"></el-option>
									<el-option value="20" label="16件"></el-option>
									<el-option value="21" label="17件"></el-option>
									<el-option value="22" label="18件"></el-option>
									<el-option value="23" label="19件"></el-option>
									<el-option value="24" label="20件"></el-option>
									<el-option value="25" label="21件"></el-option>
									<el-option value="26" label="22件"></el-option>
									<el-option value="27" label="23件"></el-option>
									<el-option value="28" label="24件"></el-option>
									<el-option value="29" label="25件"></el-option>
									<el-option value="30" label="26件"></el-option>
									<el-option value="31" label="27件"></el-option>
									<el-option value="32" label="28件"></el-option>
									<el-option value="33" label="29件"></el-option>
									<el-option value="34" label="30件"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="包装体积:" prop="">
								<el-input disabled v-model="goodsInfo.paramter.bulk" placeholder="请输入内容"></el-input>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="服务:" prop="">
								<el-select disabled v-model="goodsInfo.paramter.serve_id" placeholder="请选择">
									<el-option value="1" label="包送、包安装"></el-option>
									<el-option value="2" label="包送"></el-option>
									<el-option value="3" label="包安装"></el-option>
									<el-option value="4" label="无"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="6">
							<el-form-item label="货期:" prop="">
								<el-select disabled v-model="goodsInfo.paramter.send_id" placeholder="请选择">
									<el-option value="1" label="10天"></el-option>
									<el-option value="2" label="15天"></el-option>
									<el-option value="3" label="20天"></el-option>
									<el-option value="4" label="25天"></el-option>
									<el-option value="5" label="30天"></el-option>
									<el-option value="6" label="35天"></el-option>
									<el-option value="7" label="40天"></el-option>
									<el-option value="8" label="45天"></el-option>
									<el-option value="9" label="50天"></el-option>
									<el-option value="10" label="55天"></el-option>
									<el-option value="11" label="60天"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="物流:" prop="">
								<el-select disabled v-model="goodsInfo.paramter.express_id" placeholder="请选择">
									<el-option value="1" label="买家承当运费"></el-option>
									<el-option value="2" label="卖家承担运费"></el-option>
									<el-option value="3" label="包邮"></el-option>
									<el-option value="4" label="申通快递"></el-option>
									<el-option value="5" label="顺丰速递"></el-option>
									<el-option value="6" label="圆通快递"></el-option>
									<el-option value="7" label="韵达快递"></el-option>
									<el-option value="8" label="百世汇通"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="6">
							<el-form-item label="安装方式:" prop="">
								<el-select disabled v-model="goodsInfo.paramter.install_id" placeholder="请选择">
									<el-option value="1" label="整装"></el-option>
									<el-option value="2" label="组装"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="14">
							<el-form-item label="产品包含:">
								<el-input disabled type="text" v-model="goodsInfo.paramter.contain"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="20">
						<el-col :span="14">
							<el-form-item label="商品简介:" prop="">
								<el-input disabled type="textarea" :rows="4" placeholder="请输入内容" v-model="goodsInfo.brief"></el-input>
							</el-form-item>
						</el-col>
					</el-row>
					<p class="title">旧SKU信息</p>
					<el-table :data="oldSkuList" border class="factory-table">
						<el-table-column label="ID" align="center" prop="sku_id" width="80"></el-table-column>
						<el-table-column label="分类" align="center" prop="class_name" width="80"></el-table-column>
						<el-table-column label="sku款号" align="center">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.sku_sn" placeholder=""></el-input>
							</template>
						</el-table-column>
						<el-table-column label="尺寸" align="center">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.size" placeholder=""></el-input>
							</template>
						</el-table-column>
						<el-table-column label="材质" align="center">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.lining" placeholder=""></el-input>
							</template>
						</el-table-column>
						<el-table-column label="颜色" align="center" width="120">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.color" placeholder=""></el-input>
							</template>
						</el-table-column>
						<el-table-column label="图片" align="center" width="80">
							<template slot-scope="scope">
								<ImgPopover :src="scope.row.img"></ImgPopover>
							</template>
						</el-table-column>
						<el-table-column label="出厂价" align="center" width="90">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.factory_price" placeholder=""></el-input>
							</template>
						</el-table-column>
						<el-table-column label="自营价" align="center" width="90">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.self_price" placeholder=""></el-input>
							</template>
						</el-table-column>
						<el-table-column label="零售价" align="center" width="90">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.retail_price" placeholder=""></el-input>
							</template>
						</el-table-column>
						<el-table-column label="包件" align="center" width="70">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.pack" placeholder=""></el-input>
							</template>
						</el-table-column>
						<el-table-column label="体积" align="center" width="70">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.bulk" placeholder=""></el-input>
							</template>
						</el-table-column>
						<el-table-column label="起售量" align="center" width="50">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.coefficient_num" placeholder=""></el-input>
							</template>
						</el-table-column>
						<el-table-column label="件数" align="center" width="70">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.sku_num" placeholder=""></el-input>
							</template>
						</el-table-column>
					</el-table>
					<p class="title" style="margin-top: 30px;">新SKU信息</p>
					<el-table :data="newSkuList" border class="factory-table">
						<el-table-column label="ID" align="center" prop="sku_id" width="80"></el-table-column>
						<el-table-column label="分类" align="center" prop="class_name" width="80"></el-table-column>
						<el-table-column label="sku款号" align="center">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.sku_sn" placeholder="请输入内容"></el-input>
							</template>
						</el-table-column>
						<el-table-column label="尺寸" align="center">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.size" placeholder="请输入内容"></el-input>
							</template>
						</el-table-column>
						<el-table-column label="材质" align="center">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.lining" placeholder="请输入内容"></el-input>
							</template>
						</el-table-column>
						<el-table-column label="颜色" align="center" width="120">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.color" placeholder="请输入内容"></el-input>
							</template>
						</el-table-column>
						<el-table-column label="图片" align="center" width="80">
							<template slot-scope="scope">
								<ImgPopover :src="scope.row.img"></ImgPopover>
							</template>
						</el-table-column>
						<el-table-column label="出厂价" align="center" width="90">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.factory_price" placeholder="请输入内容"></el-input>
							</template>
						</el-table-column>
						<el-table-column label="自营价" align="center" width="90">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.self_price" placeholder="请输入内容"></el-input>
							</template>
						</el-table-column>
						<el-table-column label="零售价" align="center" width="90">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.retail_price" placeholder="请输入内容"></el-input>
							</template>
						</el-table-column>
						<el-table-column label="包件" align="center" width="70">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.pack" placeholder="请输入内容"></el-input>
							</template>
						</el-table-column>
						<el-table-column label="体积" align="center" width="70">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.bulk" placeholder="请输入内容"></el-input>
							</template>
						</el-table-column>
						<el-table-column label="起售量" align="center" width="50">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.coefficient_num" placeholder="请输入内容"></el-input>
							</template>
						</el-table-column>
						<el-table-column label="件数" align="center" width="70">
							<template slot-scope="scope">
								<el-input disabled v-model="scope.row.sku_num" placeholder="请输入内容"></el-input>
							</template>
						</el-table-column>
					</el-table>
					<div class="goods-image">
						<p class="title" style="font-size: 20px;">商品图片</p>
						<div class="main-image">
							<el-row :gutter="20">
								<el-col :span="6">
									<el-form-item label="主图:" prop="">
										<el-upload disabled ref="upload" action="fakeaction" :http-request=" function(res) { return upload(res); } "
										 multipleaccept="image/*" :show-file-list="false"> <img v-if="goodsInfo.image_middle" :src="goodsInfo.image_middle"
											 width="100%" />
											<i v-else class="el-icon-plus"></i>
										</el-upload>
									</el-form-item>
								</el-col>
								<el-col :span="18">
									<el-form-item label="副图(最多四张):" prop="">
										<el-upload disabled class="cannot-add-picture" action="fakeaction" list-type="picture-card" :file-list="vice_middle"
										 multiple :limit="4" :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
											<i class="el-icon-plus"></i>
										</el-upload>
										<el-dialog :visible.sync="dialogVisible" width="800px" center :modal-append-to-body="false">
											<img width="100%" :src="dialogImageUrl" alt="" />
										</el-dialog>
									</el-form-item>
								</el-col>
								<el-col :span="24">
									<el-form-item label="视频:" prop="">
										<video v-if="goodsInfo.video" controls :src="goodsInfo.video" width="500px" />
									</el-form-item>
								</el-col>
								<el-col :span="24" v-if="goodsInfo.cover_img">
									<el-form-item label="视频封面:" prop="">
										<el-upload disabled ref="upload" action="fakeaction" :http-request=" function(res) { return upload(res); } "
										 multipleaccept="image/*" :show-file-list="false"> 
											 <el-image :src="goodsInfo.cover_img" :preview-src-list="[goodsInfo.cover_img]"></el-image>
										</el-upload>
									</el-form-item>
								</el-col>
								<el-col :span="18">
									<el-form-item label="实物图:" prop="">
										<el-image style="width: 146px; height: 1460px" v-for="(item,index) in goodsInfo.shot_img" :src="item" :preview-src-list="goodsInfo.shot_img" :key="index">
							</el-image>
									</el-form-item>
								</el-col>
							</el-row>
						</div>
						<p class="title" style="font-size: 20px;">产品详情图</p>
						<div class="detail-image">
							<el-image style="width: 900px;" v-for="(item,index) in img_info" :src="item" :preview-src-list="img_info" :key="index">
							</el-image>
						</div>
					</div>
				</div>
			</el-form>

			<div style="margin-top: 30px;">
				<el-button v-if="examine_status == 0" type="primary" @click="operate(0)" style="margin-left: 100px;">审核</el-button>
				<el-button v-if="examine_status == 0" type="danger" @click="operate(1)" style="margin-left: 40px;">拒绝</el-button>
			</div>
		</el-card>
		<el-card v-if="goodsInfo !='' && isGroup">
			<div class="title">套餐SKU</div>
			<el-form :model="goodsInfo" ref="groupForm" label-width="100px">
				<el-row :gutter="20">
					<el-col :span="8">
						<el-form-item label="套餐名称:">
							<el-input v-model="goodsInfo.group_name" placeholder="请输入套餐名称" disabled></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="套餐编号:">
							<el-input v-model="goodsInfo.group_sn" placeholder="请输入套餐编号" disabled></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="出厂价格:">
							<el-input v-model="goodsInfo.retail_price" placeholder="请输入出厂价格" disabled></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="8">
						<el-form-item label="风格分类:">
							<el-select v-model="goodsInfo.style_id" disabled>
								<el-option v-for="(data,index) in styleList" :key="index" :label="data.style_name" :value="data.style_id"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="空间分类:">
							<el-select v-model="goodsInfo.space_id" disabled>
								<el-option v-for="(data,index) in spaceList" :key="index" :label="data.space_name" :value="data.space_id"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="8">
						<el-form-item label="包装件数:" prop="">
							<el-select v-model="goodsInfo.pack_id" disabled>
								<el-option v-for="(data,index) in packList" :key="index" :label="data.pack_name" :value="data.pack_id"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="包装体积:" prop="">
							<el-input v-model="goodsInfo.bulk" placeholder="请输入包装体积" disabled></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="服务:" prop="">
							<el-select v-model="goodsInfo.serve_id" disabled>
								<el-option v-for="(data,index) in serveList" :key="index" :label="data.serve_name" :value="data.serve_id"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="8">
						<el-form-item label="货期:" prop="">
							<el-select v-model="goodsInfo.send_id" disabled>
								<el-option v-for="(data,index) in sendList" :key="index" :label="data.send_name" :value="data.send_id"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="安装方式:" prop="">
							<el-select v-model="goodsInfo.install_id" disabled>
								<el-option label="整装" :value="1"></el-option>
								<el-option label="组装" :value="2"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="物流:" prop="">
							<el-select v-model="goodsInfo.express_id" disabled>
								<el-option v-for="(data,index) in expressList" :key="index" :label="data.express_name" :value="data.express_id"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="8">
						<el-form-item label="运费:" prop="" disabled>
							<el-input v-model="goodsInfo.express_price" placeholder="请输入运费" disabled></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="是否定制:">
							<el-select v-model="goodsInfo.is_customized" placeholder="请选择"  disabled>
								<el-option v-for="(item,index) in customizedList" :key="index" :value="item.value" :label="item.label"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="8">
						<el-form-item label="VR:" prop="">
							<el-input v-model="goodsInfo.vr_url" placeholder="请输入VR链接" disabled></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="排序:">
							<el-input v-model="goodsInfo.sort" placeholder="请输入排序" disabled></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="8">
						<el-form-item label="套餐简介:" prop="">
							<el-input type="textarea" rows="6" v-model="goodsInfo.brief" placeholder="请输入套餐简介" disabled></el-input>
						</el-form-item>
					</el-col>
				</el-row>

				<div class="title">
					主套餐款号
				</div>
				<el-row :gutter="20" class="group-prolist" v-for="(data,index) in goodsInfo.major_group" :key="index">
					<el-col :span="3">
						<el-form-item label="空间分类:">
							<el-select v-model="data.group_space_id" disabled>
								<el-option v-for="(spaceData,index) in spaceList" :key="index" :label="spaceData.space_name" :value="spaceData.space_id"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
					<template v-for="(item,i) in data.group_class">
						<div class="clearfix" v-if="i > 0"></div>
						<el-col :span="3" v-if="i > 0" style="font-size: 0; height: 1px;"></el-col>
						<!-- <el-col :span="6" v-if="$route.name!=='add_package'&& i > 0" style="font-size: 0; height: 1px;"></el-col> -->
						<el-col :span="3">
							<el-form-item label="品类分类:">
								<el-select v-model="item.group_class_id" disabled>
									<el-option v-for="(classData,index) in ClassList" :key="index" :label="classData.class_name" :value="classData.class_id"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<template v-for="(lastItem,y) in item.goods_list">
							<div class="clearfix" v-if="y>0"></div>
							<el-col :span="6" v-if="y > 0" style="font-size: 0; height: 1px;"></el-col>
							<!-- <el-col :span="6" v-if="$route.name!=='add_package'&& y > 0" style="font-size: 0; height: 1px;"></el-col> -->
							<el-col :span="5">
								<el-form-item label="主套餐商品:" >
									<el-input placeholder="请输入商品款号" v-model="lastItem.group_goods" disabled></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="3">
								<el-form-item label="数量:">
									<el-input placeholder="商品数量" v-model="lastItem.num" disabled></el-input>
								</el-form-item>
							</el-col>
						</template>
					</template>
				</el-row>
				<div class="title">套餐图片</div>
				<div class="case_upload clearfix">
					<el-col :span="5">
						<el-form-item label="上传主图:" class="upload-box">
							<div class="case-img-upload">
								<div class="case-img-upload-imgs">
									<el-image :src="goodsInfo.image">
										<div slot="error"></div>
									</el-image>
								</div>
							</div>
						</el-form-item>
					</el-col>
					<el-col :span="5">
						<el-form-item label="货架图:" class="upload-box">
							<div class="case-img-upload">
								<div class="case-img-upload-imgs">
									<el-image :src="goodsInfo.shelf_image">
										<div slot="error"></div>
									</el-image>
								</div>
							</div>
						</el-form-item>
					</el-col>
					
					<el-col :span="24">
						<p class="title" style="font-size: 20px;">产品详情图</p>
						<div class="detail-image">
							<el-image style="width: 900px;" v-for="(item,index) in goodsInfo.img_info" :src="item.image" :key="index">
							</el-image>
						</div>
					</el-col>
				</div>
			</el-form>
			<div style="margin-top: 30px;">
				<el-button v-if="examine_status == 0" type="primary" @click="operate(0)" style="margin-left: 100px;">审核</el-button>
				<el-button v-if="examine_status == 0" type="danger" @click="operate(1)" style="margin-left: 40px;">拒绝</el-button>
			</div>
		</el-card>
		<!-- 拒绝原因弹框 -->
		<el-dialog title="拒绝原因" :visible.sync="remarksDialog" center :modal-append-to-body="false" width="680px">
			<el-form :model="remarksForm" :rules="remarksFormRules" ref="remarksForm" label-width="120px">
				<el-form-item label="拒绝原因:" prop="reason">
					<el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="remarksForm.reason"></el-input>
				</el-form-item>
			</el-form>
			<span slot="footer" class="dialog-footer">
				<el-button @click="remarksDialog = false">取 消</el-button>
				<el-button type="primary" @click="confirmClick('remarksForm')">确 定</el-button>
			</span>
		</el-dialog>
	</div>
</template>

<script>
	import ImgPopover from '@/components/ImgPopover';
	import {
		packList,
		serveList,
		sendList,
		expressList,
		styleList,
		spaceList,
		platformList
	} from '@/assets/api/JSON'
	export default {
		components: {
			ImgPopover
		},
		data() {
			return {
				examine_id: '',
				examine_status: '',
				vice_middle: [],
				img_info: [],
				dialogImageUrl: '',
				dialogVisible: false,
				goodsInfo: '',
				newSkuList: [],
				oldSkuList: [],
				StyleList: [], // 风格
				SpaceList: [], // 空间
				TextureList: [], // 材质
				ClassList: [], // 品类
				packList: packList,
				styleList: styleList,
				spaceList: spaceList,
				serveList: serveList,
				sendList: sendList,
				expressList: expressList,
				remarksDialog: false,
				customizedList: [
					{
						value: 0,
						label: '否'
					},
					{
						value: 1,
						label: '是'
					}
				],
				remarksForm: {
					reason: ''
				},
				remarksFormRules: {
					reason: [{
						required: true,
						message: '请输入内容'
					}]
				},
				isGoods: false,
				isGroup: false
			};
		},
		methods: {
			init() {
				let data = {
					goods_id: this.$route.query.id,
					paramter: 1,
					id: this.$route.query.examine_id
				};
				this.$http(this.$ApiList.ExamineInfo, data).then(res => {
					this.examine_status = res.datas.examine_status
					this.examine_id = res.datas.examine_id
					this.newSkuList = res.datas.sku_list;
					this.oldSkuList = res.datas.old_sku_list;
					if(res.datas.goods_info){
						this.goodsInfo = res.datas.goods_info
						this.goodsInfo.paramter.install_id = String(this.goodsInfo.paramter.install_id)
						this.goodsInfo.paramter.filler_id = String(this.goodsInfo.paramter.filler_id)
						this.goodsInfo.paramter.craft_id = String(this.goodsInfo.paramter.craft_id)
						this.goodsInfo.paramter.pack_id = String(this.goodsInfo.paramter.pack_id)
						this.goodsInfo.paramter.serve_id = String(this.goodsInfo.paramter.serve_id)
						this.goodsInfo.paramter.send_id = String(this.goodsInfo.paramter.send_id)
						this.goodsInfo.paramter.express_id = String(this.goodsInfo.paramter.express_id)
						for (let i in res.datas.goods_info.vice_middle) {
							let item = {
								url: res.datas.goods_info.vice_middle[i]
							};
							this.vice_middle.push(item);
						}
						this.img_info = res.datas.goods_info.img_info
						this.isGoods = true
					}
					if(res.datas.group_info){
						this.goodsInfo = res.datas.group_info
						this.isGroup = true
					}
				});
			},
			getClassify() {
				// 风格
				this.$http(this.$ApiList.StyleList).then(res => {

					this.StyleList = res.datas;

				});
				// 空间
				this.$http(this.$ApiList.SpaceList).then(res => {

					this.SpaceList = res.datas;

				});
				// 材质
				this.$http(this.$ApiList.TextureList).then(res => {

					this.TextureList = res.datas;

				});
				let data = {
					store_id: localStorage.getItem('shop_id')
				};
				// 品类
				this.$http(this.$ApiList.ClassList, data).then(res => {

					this.ClassList = res.datas;

				});
			},
			handleRemove(file, fileList) {
				console.log(file, fileList);
				for (let i in this.vice_middle) {
					if (this.vice_middle[i].uid == file.uid) {
						delete this.vice_middle[i];
					}
				}
				console.log(this.vice_middle);
			},
			handlePictureCardPreview(file) {
				this.dialogImageUrl = file.url;
				this.dialogVisible = true;
			},
			// 图片上传
			upload(params) {
				const file = params.file,
					isJPGPNG = file.type === 'image/jpeg' || 'image/png',
					isLt1MB = file.size / 1024 <= 1024;

				if (!isJPGPNG) {
					this.$message.error('只能上传图片格式png、jpg!');
					return;
				}
				if (!isLt1MB) {
					this.$message.error('图片不能大于1M');
					return;
				}
				const form = new FormData();
				form.append('file[]', file);
			},
			// 视频上传
			uploadVideo(params) {
				const file = params.file,
					isLt20MB = file.size / 1024 / 1024 < 20;
				if (!isLt20MB) {
					this.$message.error('视频不能大于20MB！');
					return;
				}
				const form = new FormData();
				form.append('file[]', file);
				return;
				this.$http(this.$ApiList.UpVideo, form).then(res => {});
			},
			remove(file, fileList) {
				console.log(file, fileList);
			},
			handlePreview(file) {
				console.log(file);
			},
			// 返回
			goBack() {
				this.$router.go(-1);
			},
			// 0 审核 1 拒绝
			operate(type) {
				let data = {
					examine_id: this.examine_id
				};
				switch (type) {
					case 0:
						this.$http(this.$ApiList.ExamineSuccess, data).then(res => {
							this.$layer.msg('操作成功');
							setTimeout(() => {
								this.goBack()
							}, 1000)
						});
						break;
					case 1:
						this.remarksDialog = true
						this.remarksForm.examine_id = this.examine_id
						break;
				}
			},
			//提交
			confirmClick(formName) {
				this.$refs[formName].validate(valid => {
					if (valid) {
						this.$http(this.$ApiList.ExamineRefuse, this.remarksForm).then(res => {
							this.$layer.msg('操作成功');
							this.remarksDialog = false
							this.init()
							setTimeout(() => {
								this.goBack()
							}, 1000)
						});
					} else {
						this.$layer.msg('请填写完整信息后提交');
					}
				});
			},
		},
		created() {
			this.init();
			this.getClassify();
		}
	};
</script>

<style lang="scss">
	.goods-details {


		.main-image .el-upload {
			background-color: #fbfdff;
			border: 1px dashed #c0ccda;
			border-radius: 6px;
			box-sizing: border-box;
			width: 148px;
			height: 148px;
			cursor: pointer;
			line-height: 146px;
			vertical-align: top;
		}

		.main-image .el-upload .el-icon-plus {
			font-size: 28px;
			color: #8c939d;
		}

		.goods-image {
			margin-top: 30px;
		}

		.cannot-add-picture .el-upload--picture-card {
			display: none;
		}
		.detail-image {
			width: 902px;
			border: 1px solid #E3E3E3;
		}
	}
</style>
